package com.hq.zb.exception;

/**
 * 异常的枚举类
 * @author huanghanui
 * @date 2022-03-24
 */
public enum BizExceptionEnum {
    /**
     * 异常
     */
    ID_NOT_NULL(50001, "ID不能为NULL"),
    FIND_MODEL_BY_ID_ERROR(50002, "根据id查询数据时异常"),
    DATA_NOT_EXIST(50003, "数据不存在"),
    INVALID_ARGUMENT(50004, "无效的参数"),
    DATA_NOT_NULL(50005, "数据不能为NULL"),
    DATA_NOT_ONLY(50006, "数据重复"),
    DATA_ERROR(50007, "数据异常"),
    UPDATE_ERROR(500016, "修改数据时异常!"),
    ROLE_AUTH_ERROR(500017, "角色授权失败!");

    private Integer code;
    private String desc;

    BizExceptionEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}

